import { Article as ArticleEntity } from '@/entity/Article';
import { PaginationConfig } from '@/types';

export type ArticleCreateRequest = Pick<
  ArticleEntity,
  'coverUrl' | 'headline' | 'outline' | 'tagIds' | 'userId' | 'status'
> & {
  // 文章内容
  content: string;
};

export type ArticleUpdateRequest = ArticleCreateRequest;

export type GetArticlesRequest = Pick<
  ArticleEntity,
  'headline' | 'outline' | 'tagIds' | 'id' | 'status'
> & {
  author: ArticleEntity['user']['nickname'];
  tagIds: string | string[];
} & PaginationConfig;
